<h1>Dodaj materiał (OLD)</h1>

<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Obraz</a></li>
        <li><a href="#tabs-2">Video</a></li>
    </ul>
    <div id="tabs-1">



        <div class="form">
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'content-form',
                'enableClientValidation' => true,
                'enableAjaxValidation' => false,
                'clientOptions' => array(
                    'validateOnSubmit' => true,
                ),
                'htmlOptions' => array('enctype' => 'multipart/form-data')
                    ));
            ?>
            <?php echo $form->errorSummary($model, "<p>Wykryto następujące błędy:</p>"); ?>

            <p class="note">Pola oznaczone <span class="required">*</span> są obowiązkowe.</p>

            <div id="file_field_container" class="row" style="margin: 10px 0;">
                <?php echo $form->labelEx($model, 'file'); ?>
                <?php echo $form->fileField($model, 'file', array('size' => 45, 'maxlength' => 500)); ?>
                <?php echo $form->error($model, 'file'); ?>
            </div>

            <div class="row">
                <?php echo CHtml::activeLabel($model, 'title'); ?>
                <?php echo CHtml::activeTextField($model, 'title', array('size' => 45, 'maxlength' => 45)) ?>
            </div>

            <div class="row">
                <?php echo CHtml::activeLabel($model, 'source'); ?>
                <?php echo CHtml::activeTextField($model, 'source', array('size' => 70, 'maxlength' => 200)) ?>
            </div>

            <?php if (CCaptcha::checkRequirements()): ?>
                <div class="row">
                    <?php echo $form->labelEx($model, 'verifyCode'); ?>
                    <div>
                        <?php $this->widget('CCaptcha'); ?><br/>
                        <?php echo $form->textField($model, 'verifyCode'); ?>
                    </div>
                    <div class="hint">Please enter the letters as they are shown in the image above.
                        <br/>Letters are not case-sensitive.</div>
                    <?php echo $form->error($model, 'verifyCode'); ?>
                </div>
            <?php endif; ?>

            <div class="row buttons">
                <?php echo CHtml::submitButton('Submit'); ?>
            </div>

            <?php $this->endWidget(); ?>
        </div>
    </div>
    <div id="tabs-2">
        <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
    </div>
</div>
<script>
    $(function() {
        $( "#tabs" ).css('display', 'none');
        $( "#tabs" ).tabs(); 
    });
    $(document).ready(function(){
        $( "#tabs" ).css('display', '');
    });
</script>

